package com.jsu.clubmanagementsystem.common;

/**
 * 自定义状态码
 */
public enum ErrorCode {
    SUCCESS(0,"OK"),
    PARAM_ERROR(40000,"参数错误"),
    NOT_LOGIN(40100,"未登录"),
    NO_AUTH(40101,"无权限"),
    NOT_FOUND(40400,"请求数据不存在"),
    FORBIDDEN_ERROR(40300, "禁止访问"),
    SYSTEM_ERROR(50000,"系统错误"),
    OPERATION_ERROR(50001, "操作失败");

    /**
     * 状态码
     */
    private final int code;

    /**
     * 信息
     */
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
